package com.soft.bams.vo;

public class RankVO implements Comparable<RankVO>{


    private String personId;

    private String name;

    private double total;


    @Override
    public int compareTo(RankVO o) {
        if(this.total == o.total){
            return this.personId.compareTo(o.personId);
        }
        return Double.compare(o.total, this.total);
    }

    public RankVO() {
    }

    public RankVO(String personId, String name, double total) {
        this.personId = personId;
        this.name = name;
        this.total = total;
    }

    /**
     * 获取
     * @return personId
     */
    public String getPersonId() {
        return personId;
    }

    /**
     * 设置
     * @param personId
     */
    public void setPersonId(String personId) {
        this.personId = personId;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return total
     */
    public double getTotal() {
        return total;
    }

    /**
     * 设置
     * @param total
     */
    public void setTotal(double total) {
        this.total = total;
    }

    public String toString() {
        return "RankVO{personId = " + personId + ", name = " + name + ", total = " + total + "}";
    }
}
